import { MockMethod } from "vite-plugin-mock"

export default [
  {
    url: "/dev-api/system/menu/user",
    timeout: 2000,
    method: "get",
    response: () => {
      return {
        "code": 20000,
        "message": "查询成功",
        "data": {
          "userInfo": {
            "nickName": "@cname",
            "username": "@word(10)",
            "imageUrl": "@image",
          },
          "buttonList": [
            "system:menu:search",
            "system:child:add",
            "system:menu:edit",
            "system:role:search",
            "system:role:add",
            "system:role:edit",
            "system:role:delete",
            "system:role:menu",
            "system:user:search",
            "system:user:add",
            "system:user:edit",
            "system:user:delete",
            "system:user:password",
            "goods:search",
            "goods:add",
            "goods:edit",
            "goods:delete",
            "goods:category:search",
            "goods:category:add",
            "goods:category:edit",
            "goods:category:delete"
          ],
          "menuList": [
            {
              "path": "/home",
              "name": "Home", // 路由名称
              "redirect": null,
              "component": "home/index.vue", // 不要写 @/views/
              "meta": {
                "title": "首页",
                "icon": "ele-HomeFilled",
                "cache": true,
                "hidden": false
              },
              "children": []
            },
            {
              "path": "/system",
              "name": "System",
              "redirect": "/system/menu",
              "meta": {
                "title": '系统管理',
                "icon": 'ele-Setting',
                // "cache": true,
                "hidden": false
              },
              "children": [
                {
                  "path": '/system/menu',
                  "name": 'SystemMenu',
                  "redirect": null,
                  "component": "system/menu/index.vue",
                  "meta": {
                    "title": '菜单管理',
                    "icon": 'ele-Menu',
                    "cache": true,
                    "hidden": false
                  },
                  "children": []
                },
                {
                  "path": '/system/role',
                  "name": 'SystemRole',
                  "component": "system/role/index.vue",
                  "meta": {
                    "title": '角色管理',
                    "icon": 'ele-IceCream',
                    "cache": false,
                    "hidden": false
                  },
                  "children": []
                },
                {
                  "path": '/system/user',
                  "name": 'SystemUser',
                  "redirect": null,
                  "component": "system/user/index.vue",
                  "meta": {
                    "title": '用户管理',
                    "icon": 'ele-User',
                    "cache": true,
                    "hidden": false
                  },
                  "children": []
                }
              ]
            },
            {
              "path": "/power/menu",
              "name": "Power",
              "meta": {
                "title": '用电管理',
                "icon": 'ele-Setting',
                // "cache": true,
                "hidden": false
              },
              "children": [
                {
                  "path": '/power/menu',
                  "name": 'Office',
                  "redirect": null,
                  "component": "power/office/index.vue",
                  "meta": {
                    "title": '办公用电',
                    "icon": 'ele-Menu',
                    "cache": true,
                    "hidden": false
                  },
                  "children": []
                },
                {
                  "path": '/power/aircondition',
                  "name": 'Aircondition',
                  "redirect": null,
                  "component": "power/aircondition/index.vue",
                  "meta": {
                    "title": '空调用电',
                    "icon": 'ele-Menu',
                    "cache": true,
                    "hidden": false
                  },
                  "children": []
                },
              ]
            },
            {
              "path": "/kelaiduo",
              "name": "kelaiduo", // 路由名称
              "redirect": null,
              "component": "link/index.vue",
              "meta": {
                "title": "智能管理官网",
                "icon": "ele-Link",
                "linkTo": 'https: //www.kelaiduo.com', // 外链跳转地址
                "cache": true,
                "hidden": false
              },
              "children": []
            }
          ]
        }
      }
    }
  },
] as MockMethod[]